<template>
  <div class="ct-table"  v-icolumn="value">
    <el-table :data="data.tableData" :show-summary="data.attribute['show-summary']" style="width: 100%" v-iedit :stripe="data.attribute.stripe" :border="data.attribute.border" :fit="data.attribute.fit" :show-header="data.attribute['show-header']" :size="data.attribute.size">
      <el-table-column v-if="data.selection" type="selection" width="55"></el-table-column>
      <el-table-column v-if="data.sequence" type="index" width="55"></el-table-column>
      <component :is="item.components" v-model="value.slot[i]" v-for="(item,i) in value.slot" :key="i"></component>
    </el-table>
<!--     <div class="add-column"  v-icolumn="value">
      <i class="el-icon-plus"></i>
    </div> -->
  </div>
</template>
<script type="text/javascript">
// import widgets_column from '../column'
// import { Core } from '../../../dragdrop/index.js';
export default {
  props: {
    value: [Array, Object]
  },
  computed: {
    data() {
      return this.value.data
    }
  },
  /**
   * 页面方法
   * @type {Object}
   */
  methods: {
    addColumn() {
      // let widget = Core.deepCopy(widgets_column);
      // console.log('2223',widget);
      // let index = this.value.slot.length;
      // widget.location = this.value.location + "-" + index;
      // console.log(widget);
      // this.value.slot.push(widget);
      // Core.handleEvent(this.value, widget)
      // console.log('添加列', this.value);
    },


  }
}

</script>
<style type="text/css" lang="scss">
.ct-table {
  display: flex;
  justify-content: flex-start;
  align-items :center;

  .add-column {
    background-color: #fff;
    width: 16px;
    height: 32px;
    display: flex;
    justify-content: flex-start;
    align-items :center;
    border:solid 1px #efefef;
    border-left:0px;
    color:#666;
    border-top-right-radius:4px;
    border-bottom-right-radius:4px 
  }

}

</style>
